import numpy as np
from matplotlib import pyplot as plt
plt.figure(figsize=(9,6))
n = 8
X = np.arange(n)+1

Y1 = np.random.uniform(0.5,1.0,n)
Y2 = np.random.uniform(0.5,1.0,n)
Y2 = [44,80,118,64,376,173,123,76]
Y1 = [15,25,34,22,77,34,38,18]

loss = plt.bar(X,Y1,width = 0.35,facecolor = 'lightskyblue',edgecolor = 'white')
auc = plt.bar(X+0.35,Y2,width = 0.35,facecolor = 'yellowgreen',edgecolor = 'white')

for x,y in zip(X,Y1):
    plt.text(x+0.35, y+0.01, '%.0f' % y, ha='center', va= 'bottom')

for x,y in zip(X,Y2):
    plt.text(x+0.35, y+0.01, '%.0f' % y, ha='center', va= 'bottom')
plt.legend((loss,auc,),(u"LLE Time",u"Without LLE Time",))
plt.ylabel('Minute(min)')
plt.xlabel('Patient')
plt.title('Time Comparison')
plt.ylim(0,+400)
plt.show()